<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // location 是js对地址栏的封装对象，一般通过它来控制页面跳转

        //设置 或 返回当前浏览器的完整url
        // alert(location.href)
        // location.href = "https://www.baidu.com";


        function go() {
            //location.href = "https://www.baidu.com";

            //将当前网址替换为xx
            // location.replace("https://www.baidu.com");

            //刷新页面
            location.reload();

        }

    </script>
</head>

<body>
    <input type="button" value="按钮" onclick="go()">

</body>

</html>